package com.cloudbroker.bcs.platform.ltb.middle.service.impl;

import com.cloudbroker.bcs.common.dao.base.DAOBase;
import com.cloudbroker.bcs.platform.ltb.bizapi.service.admin.vo.BlackUserForm;
import com.cloudbroker.bcs.platform.ltb.middle.dao.BlackUserDAO;
import com.cloudbroker.bcs.platform.ltb.middle.dao.CustomerDAO;
import com.cloudbroker.bcs.platform.ltb.middle.dao.UserDAO;
import com.cloudbroker.bcs.platform.ltb.middle.entity.BlackUser;
import com.cloudbroker.bcs.platform.ltb.middle.entity.CommentMsg;
import com.cloudbroker.bcs.platform.ltb.middle.service.BlackuserService;
import com.cloudbroker.bcs.platform.ltb.middle.service.base.TenantServiceImplBase;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by lili19289 on 2016/8/18.
 */
@Service
public class BlackUserServiceImpl extends TenantServiceImplBase<BlackUser,String> implements BlackuserService {



    @Resource
    private BlackUserDAO blackUserDAO;

    @Override
    protected DAOBase getDAO() {
        return blackUserDAO;
    }


    public BlackUser getBlackUser(BlackUser user){
        return blackUserDAO.getBlackUser(user);
    }

    public void deletBlackUser(BlackUser user){
        blackUserDAO.delete(user);
    }

    @Override
    public boolean  isUserExit(BlackUser user){
        BlackUser blackUser = blackUserDAO.getBlackUser(user);
        return blackUser==null?false:true;
    }

    public List<BlackUser> funQueryBlackUser(BlackUserForm userForm){
        return blackUserDAO.queryBlackUsers(userForm);
    }
}
